/**
 * @author liuxin
 * @e-mail lxtobe5@gmail.com
 * @update 2011.11.19
 * @prompt If you find my mistake, please contact with me via my e-mail.
 */
package API_sample.TopLevel_samples.GlobalFunctions_samples
{
	import flash.display.Sprite;
	
	public class Boolean_sample extends Sprite
	{
		public function Boolean_sample()
		{
			/*0*/
			trace(Boolean(0));            //false
			/*NaN*/
			trace(Boolean(NaN));          //false
			/*null*/
			trace(Boolean(null));	      //false
			/*undefined*/
			trace(Boolean(undefined));    //false
			/*空字符串*/
			trace(Boolean(""));	          //false
			/*非空字符串*/
			trace(Boolean("6"));	      //true
			/*数字（非 0 或 NaN）*/
			trace(Boolean(4));	          //true
			/*Object 类的实例*/
			trace(Boolean(new Object())); //true
		}
	}
}